package model;

import java.util.ArrayList;
import java.util.HashMap;

import language.Hebrew;
import language.LangIntrf;

public class BusinessTypes {
	
	private HashMap<String,ArrayList<String>> statusHash = new HashMap<String,ArrayList<String>>();
	private HashMap<String,ArrayList<String>> messageHash = new HashMap<String,ArrayList<String>>();
	private static BusinessTypes inst = new BusinessTypes();
	
	public static BusinessTypes getInst()
	{
		return inst;
	}
		
	
	private BusinessTypes() {
		addLang("he", new Hebrew());
		addLang("en", new LangIntrf());		

	}
	
	private void addLang(String langName,LangIntrf lang)
	{
		//Restaurant
		ArrayList<String> restaurantStatus = new ArrayList<String>();
		restaurantStatus.add(lang.getACCEPTED_STATUS());
		restaurantStatus.add(lang.getCOOKING_STATUS());
		restaurantStatus.add(lang.getPACKING_STATUS());
		restaurantStatus.add(lang.getDELIVERY_STATUS());
		restaurantStatus.add(lang.getDONE_STATUS());
		statusHash.put("Restaurant_"+langName, restaurantStatus);
		
		ArrayList<String> restaurantMessage = new ArrayList<String>();
		restaurantMessage.add(lang.getDELAY_MESSAGE());
		restaurantMessage.add(lang.getSTOCK_MESSAGE());
		messageHash.put("Restaurant_"+langName, restaurantMessage);
		
		
		//Delivery
		ArrayList<String> deliveryStatus = new ArrayList<String>();
		deliveryStatus.add(lang.getACCEPTED_STATUS());
		deliveryStatus.add(lang.getPACKING_STATUS());
		deliveryStatus.add(lang.getWAITING_SHIPMENT_STATUS());
		deliveryStatus.add(lang.getSHIPMENT_STATUS());
		deliveryStatus.add(lang.getCUSTOMS_STATUS());
		deliveryStatus.add(lang.getDELIVERY_STATUS());
		deliveryStatus.add(lang.getDONE_STATUS());
		statusHash.put("Delivery_"+langName, deliveryStatus);
		
		ArrayList<String> deliveryMessage = new ArrayList<String>();
		deliveryMessage.add(lang.getDELAY_MESSAGE());
		deliveryMessage.add(lang.getSTOCK_MESSAGE());
		messageHash.put("Delivery_"+langName, deliveryMessage);
		
	}
	
	public ArrayList<String> getStatusOfBizType(String bizType,String langName)
	{
		return statusHash.get(bizType+"_"+langName);
	}
	
	public ArrayList<String> getMessageOfBizType(String bizType, String langName)
	{
		return messageHash.get(bizType+"_"+langName);
	}
	
	
	

}
